import type { RouteRecordRaw } from "vue-router"

const routes: RouteRecordRaw[] = [
  { path: '/index', redirect: '/' },
  { 
    path: '/', // 首页
    component: () => import('@/components/Basic/index.vue'),
    children: [
      { 
        path: '', 
        name: 'index', 
        component: () => import('@/views/basic/index.vue'),
      },
      { 
        path: '/hot', // 热搜榜
        name: 'hot', 
        component: () => import('@/views/basic/hot.vue'),
      },
      { 
        path: '/news', // 新闻动态
        name: 'news', 
        component: () => import('@/views/basic/news.vue'),
      },
      { 
        path: '/about', // 关于我们
        name: 'about', 
        component: () => import('@/views/basic/about.vue'),
      },
    ],
  },
  // { 
  //   path: '/hot', // 热搜榜
  //   component: () => import('@/views/basic/hot.vue'),
  // },
  // { 
  //   path: '/news', // 新闻动态
  //   component: () => import('@/views/basic/news.vue'),
  // },
  // { 
  //   path: '/about', // 关于我们
  //   component: () => import('@/views/basic/about.vue'),
  // },

  // Tab页面
  { 
    path: '/home', // 首页
    component: () => import('@/views/tabs/home.vue'),
    props: (route: any) => route,
  },
  { 
    path: '/welfare', // 公益榜
    component: () => import('@/views/tabs/welfare.vue'),
    props: (route: any) => route,
  },
  { 
    path: '/credit', // 反诈
    component: () => import('@/views/tabs/credit.vue'),
    props: (route: any) => route,
  },
  { 
    path: '/user', // 我的
    component: () => import('@/views/tabs/user.vue'),
    props: (route: any) => route,
  },

  { 
    path: '/login', // 登录
    component: () => import('@/views/login.vue'),
    props: (route: any) => route
  },
  { 
    path: '/register', // 注册
    component: () => import('@/views/register.vue'),
    props: (route: any) => route
  }, 
  { 
    path: '/bank', // 银行卡
    component: () => import('@/views/bank.vue'),
    props: (route: any) => route
  }, 
  { 
    path: '/recharge', // 充值
    component: () => import('@/views/recharge.vue'),
    props: (route: any) => route
  }, 
  { 
    path: '/records', // 充提记录
    component: () => import('@/views/records.vue'),
    props: (route: any) => route
  }, 
  { 
    path: '/tradeRecords', // 交易记录
    component: () => import('@/views/tradeRecords.vue'),
    props: (route: any) => route
  }, 
  { 
    path: '/gift', // 捐款
    component: () => import('@/views/gift.vue'),
    props: (route: any) => route
  }, 
  { 
    path: '/setting', // 安全中心（设置的意思）
    component: () => import('@/views/setting.vue'),
    props: (route: any) => route
  }, 
  { 
    path: '/withdraw', //提现
    component: () => import('@/views/withdraw.vue'),
    props: (route: any) => route
  }, 
  { 
    path: '/editPass', // 安全中心 -  修改账户密码
    component: () => import('@/views/editPass.vue'),
    props: (route: any) => route
  }, 
  { 
    path: '/withdrawPass', // 安全中心 - 绑定提现密码
    component: () => import('@/views/withdrawPass.vue'),
    props: (route: any) => route
  }, 
]

export default routes
